<template>
	<view class="add_person_container">
		<view class="form">
			<u-form :model="form" ref="uForm">
				<u-form-item label="姓名">
					<u-input v-model="form.name" placeholder="输入体检人真实姓名[必填]" />
				</u-form-item>
				<u-form-item label="手机号码" label-width="150">
					<u-input v-model="form.phone" placeholder="[必填]" />
				</u-form-item>
				<u-form-item label="婚否">
					<u-radio-group v-model="form.marrayValue">
						<u-radio name="hadMarry">
							已婚
						</u-radio>
						<u-radio name="noMarry">
							未婚
						</u-radio>
					</u-radio-group>
				</u-form-item>
				<u-form-item label="身份证号" label-width="150">
					<u-input v-model="form.idCard" placeholder="输入正确的身份证号[必填]" />
				</u-form-item>
				<u-form-item label="性别">
					<u-radio-group v-model="form.sex">
						<u-radio name="male">
							男
						</u-radio>
						<u-radio name="female">
							女
						</u-radio>
					</u-radio-group>
				</u-form-item>
			</u-form>
		</view>

		<!-- 按钮区域 -->
		<view class="sure_btn" @click="savePerson">
			<view><text>保存</text></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					name: '', //姓名
					phone: '', //电话
					sex: 'male', //性别
					marrayValue: 'hadMarry', //婚否
					idCard: '', //身份证号
				},
			};
		},
		methods:{
			savePerson(){
				uni.navigateBack({
					delta:1
				})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.add_person_container {
		.form {
			padding: 20rpx;
		}

		// 底部按钮
		.sure_btn {
			width: 750rpx;
			height: 96rpx;
			background-color: #59b58d;
			color: white;
			font-size: 18px;
			text-align: center;
			position: fixed;
			bottom: 0;
			line-height: 96rpx;
		}
	}
</style>
